//
//  XQHomeTopChooseViewView.m
//  JoinPeso
//
//  Created by 小琦 on 2024/11/19.
//

#import "XQHomeTopChooseViewView.h"

@implementation XQHomeTopChooseViewView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self makeUI];
        [self makeConstraints];
    }
    return self;
}

- (void)makeUI {
    [self addSubview:self.imageView];
    [self addSubview:self.topLb];
    [self addSubview:self.bottomLb];
}

- (void)makeConstraints {
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@0);
        make.left.equalTo(@0);
        make.width.equalTo(@22);
        make.height.equalTo(@22);
    }];
    [self.topLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.imageView);
        make.left.equalTo(self.imageView.mas_right).offset(2);
    }];
    [self.bottomLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.topLb.mas_left);
        make.top.equalTo(self.topLb.mas_bottom).offset(1);
    }];
}

#pragma mark - lazy

- (UIImageView *)imageView {
    if (!_imageView) {
        _imageView = [[UIImageView alloc] init];
    }
    return  _imageView;
}

- (UILabel *)topLb {
    if (!_topLb) {
        _topLb = [[UILabel alloc] init];
        _topLb.font = [UIFont systemFontOfSize:14];
    }
    return  _topLb;
}

- (UILabel *)bottomLb {
    if (!_bottomLb) {
        _bottomLb = [[UILabel alloc] init];
        _bottomLb.font = [UIFont boldSystemFontOfSize:18];
    }
    return  _bottomLb;
}

@end
